Masterarbeit v0.6.2

Docs

Endpoint: /ocr/<id>

Returns the found text of an image and their corresponding meta data.

Request

URL

Method: GET /api/ocr/<id>

Request Parameters

  • id: ID of the image (required)

Request Body

no request body

Response

Response Elements

  • id: ID of the requested image
  • imageTexts: list of texts in image
  • imageText.id: ID of texts in image
  • imageText.text: found text content
  • imageText.top: distance from top of found text
  • imageText.left: distance from left of found text
  • imageText.height: height of found text
  • imageText.width: width of found text
  • imageText.confidence: confidence of ocr to detect found text betweeen 0 (bad) and 100 (good)

Examples

Request

GET /api/ocr/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Content-type: application/json

Response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "imageTexts": [
    {
      "text": "OVERTHINKING",
      "top": "280px",
      "left": "214px",
      "height": "319px",
      "width": "23px",
      "confidence": 90.360764
    },
    {
      "text": "no",
      // ...
    },
    // ...
  ]
}